<%--
  Created by IntelliJ IDEA.
  User: lt
  Date: 2017/5/9
  Time: 14:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>

    <title>新增广告</title>
    <%@ include file="/common/include-core.jsp" %>
</head>
<body>
<article class="page-container">
    <form action="" method="post" class="form form-horizontal" id="form-advert-add" enctype="multipart/form-data">

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"></label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="hidden" class="input-text" value="${advert.tid}" placeholder="" id="tid" name="tid">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">标题：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="${advert.title}" placeholder="" id="title" name="title">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">详细内容：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="${advert.introducer}" placeholder="" id="introducer" name="introducer">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">广告点击链接类型：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <select class="region select radius input-text" name="linkType">
                    <option value="1">跳转网页</option>
                    <option value="2">打开媒体播放器</option>
                </select>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">广告链接地址：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="${advert.url}" placeholder="" id="url" name="url">
            </div>
        </div>
                <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">广告位置：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                     <select class="select" id="locationId" name="locationId">
                         <c:forEach items="${advertLocationList}" var="item">
                             <option value="${item.tid}" ${advert.locationId==item.tid?"selected":"" }>${item.name}</option>
                         </c:forEach>
                     </select>
                    </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">权重：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" value="${advert.sort}" placeholder="" id="sort" name="sort">
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">开始时间：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})"
                       value="<fmt:formatDate value="${advert.startTime}" pattern="yyyy-MM-dd"/>"
                       placeholder="开始时间" id="startTime" name="startTime">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">结束时间：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" onfocus="WdatePicker({skin:'whyGreen',dateFmt:'yyyy-MM-dd'})"
                       value="<fmt:formatDate value="${advert.endTime}" pattern="yyyy-MM-dd"/>"
                       placeholder="结束时间" id="endTime" name="endTime">
            </div>
        </div>


        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">类型：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <select class="select" name="type">
                    <option value="1">图片</option>
                    <option value="2">视频</option>
                </select>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">图片：</label>
            <div class="formControls col-xs-8 col-sm-9">

                <span class="btn-upload form-group">
                    <input class="input-text upload-url" type="text"  id="photo" readonly nullmsg="请添加图片！"
                           style="width:200px">
                    <a href="javascript:void(0);" class="btn btn-primary radius upload-btn"><i class="Hui-iconfont">&#xe642;</i> 浏览文件</a>
                    <input type="file" multiple name="photo" class="input-file">
				</span>
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">状态：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <select class="select" name="status">
                    <option value="1">有效</option>
                    <option value="0">无效</option>
                    <option value="2">过期/结束</option>
                </select>
            </div>
        </div>

        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3" style="position:absolute; height:400px; overflow:auto">
                <button type="button" class="btn btn-success radius" id="advertAdd" name="admin-advert-save"><i class="icon-ok"></i> 确定</button>
            </div>
        </div>
    </form>
</article>

<script type="text/javascript" src="/static/js/advert/advertAdd.js"></script>


<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
